import { createApp } from 'vue'
import { createPinia } from 'pinia'
import './style.css'
import App from './App.vue'
import router from "./router"; //添加router
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';
//导入组件库
import * as antIcons from '@ant-design/icons-vue'
const app = createApp(App)

// 注册组件
Object.keys(antIcons).forEach(key => {
    const value:any = antIcons
    app.component(key, value[key])
})
// 添加到全局
app.config.globalProperties.$antIcons = antIcons
app.use(router).use(Antd).use(createPinia()).mount('#app') //use(router)